package com.youthburin.rmp.domain;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the rmp_dict database table.
 * 
 */
@Embeddable
public class RmpDictPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="CODE", unique=true, nullable=false, length=32)
	private String code;

	@Column(name="TYPE_CODE", unique=true, nullable=false, length=32)
	private String typeCode;

    public RmpDictPK() {
    }
	public String getCode() {
		return this.code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getTypeCode() {
		return this.typeCode;
	}
	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof RmpDictPK)) {
			return false;
		}
		RmpDictPK castOther = (RmpDictPK)other;
		return 
			this.code.equals(castOther.code)
			&& this.typeCode.equals(castOther.typeCode);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.code.hashCode();
		hash = hash * prime + this.typeCode.hashCode();
		
		return hash;
    }
}